<div class="layui-fluid" id="VIEW-index" lay-title="客户信息详情页">
	<div class="nepadmin-pad-tb20">
		<h1 class="nepadmin-lead">A客户信息详情页</h1>
		<div class="nepadmin-ignore nepadmin-pad-tb10">

		</div>
	</div>
	<div class="layui-row layui-col-space15 showInfoBlock">
		<div class="layui-col-lg12 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">田间服务信息</h3>
					<hr>
					<table class="layui-table">
						<tbody>
							<tr>
								<td>时间</td>
								<td class="guide_time"></td>
								<td>物候期</td>
								<td class="phenological_phase"></td>
								<td>土壤湿度</td>
								<td class="soil_humidity"></td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
			
		</div>
		<div class="layui-col-lg3 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">土壤监测数据</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 soil_monitoring"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg3 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">管理操作进度</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 manage_operation"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg3 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">挂果量</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 fruit_quantity"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg3 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">树势现状</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 sapling_desc"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">肥水基础设施</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 fertilization_facility"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">问题发现</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 issue"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">下期注意事项</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 next_attention"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">近期农事操作</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 recently_operation"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">近期肥水管理</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 recently_fertilization"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">近期病虫害防治</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 recently_defend"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">下期农事操作建议</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 next_operation"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">下期肥水管理建议</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 next_fertilization"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg4 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">下期病虫害防治建议</h3>
					<hr class="layui-bg-blue">
					<p class="height-70 next_defend"></p>
				</div>
			</div>
		</div>
		<div class="layui-col-lg12 layui-col-xs12">
			<div class="layui-card">
				<div class="layui-card-body">
					<h3 class="nepadmin-c-blue">生长现状</h3>
					<hr class="layui-bg-blue">
					<div class="layui-row  layui-col-space15 growImg">
					</div>
				</div>
			</div>
		</div>
		
	</div>
</div>

<script type="text/javascript">
	getAllInfo();
	window.onhashchange=function(event){
		setTimeout(function(){
			if(window.location.hash == '#/user/details'){
			  // 获取所有信息
			  getAllInfo();
			}
		},100)
	}
	
	function getAllInfo(){
		$('.growImg').html('')
		$.ajax({
		  url: apiUrl + '/index.php/agricultural/Userindex/select?token=' + JSON.parse(window.sessionStorage.getItem('agricultural')).token,
		  data:{
			  id: JSON.parse(window.localStorage.getItem('addCustomersInfo')).id
		  },
		  type: 'POST',
		  success:function(res){
			console.log(res)
			if(res.code == 0){
				$.each(res.data[0],function(k,v){
					$('.showInfoBlock .' + k).html(v)
				})
				$.each(res.img,function(i,url){
					$('.growImg').append('<div class="layui-col-lg3 layui-col-xs12 layui-card-cover nepadmin-mar-b10"><img src="'+ url.img_path +'" class="layui-upload-img"></div>')
				})
			}else if(res.code == 2){
				tokenExpired()
			}else{
				layer.msg(res.msg)
			}
			  
		  },
		  complete:function(){
			  //loading.hide();
		  }
		});
	}
</script>

<style type="text/css">
	.height-70{
		height: 70px;
		overflow: hidden;
	}
</style>
